package cn.com.server;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

/**
 * Hello world!
 *
 */
@SpringBootApplication
@MapperScan("cn.com.server.dao")
public class App extends SpringBootServletInitializer {//spring-boot项目在外部tomcat环境下部署
	//spring-boot项目在外部tomcat环境下部署start
	@Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(App.class);
    }
	//spring-boot项目在外部tomcat环境下部署end
    public static void main( String[] args )
    {
        System.out.println( "Hello World!");
        SpringApplication.run(App.class, args);
        //new SpringUtil().setApplicationContext(SpringApplication.run(App.class, args));
    }
}
